<?php
?>
<form accept-charset="UTF-8" action="/scheduler/events?trip_id=5842" class="form-horizontal" data-remote="true" id="new-event" method="post">
<div id='calendar'></div>
<p>json-events.php needs to be running in the same directory.</p>
<div class='modal hide fade' data-backdrop='static' id='event-modal'>
    <div class='modal-header'>
        <button aria-hidden='true' class='close' data-dismiss='modal' type='button'>
            &times;
        </button>
        <h3>
            Add Event
        </h3>
    </div>
    <div class='modal-body'>
        <div class=" control-group">
            <label class="control-label">
                From
            </label>
            <div class="controls">
                <input autocomplete="off" class="date start input-small" id="event_start_date"
                name="start_date" type="text" value="" />
                <input autocomplete="off" class="time start input-small" id="event_start_time"
                name="start_time" type="text" value="" />
            </div>
        </div>
        <div class=" control-group">
            <label class="control-label">
                To
            </label>
            <div class="controls">
                <input autocomplete="off" class="date end input-small" id="event_end_date"
                name="end_date" style="display: none" type="text" value="09/20/2013" />
                <input autocomplete="off" class="time end input-small" id="event_end_time"
                name="end_time" type="text" value="03:00 PM" />
            </div>
        </div>
        <div class=" control-group">
            <label class="control-label">
            </label>
            <div class="controls">
                <label class='checkbox inline'>
                    <input id="event_multiday" name="multiday" type="checkbox" value="1" />
                    Multi-day &nbsp;
                </label><!--
                <label class='checkbox inline'>
                    <input id="event_repeat" name="repeat" type="checkbox" value="1" />
                    Repeat
                </label>-->
            </div>
        </div>
        <input name='repeat_freq' type='hidden' value='WEEKLY'>
        <div id='event_repeat_group' style='display: none'>
            <div class=" control-group">
                <label class="control-label">
                    Days
                </label>
                <div class="controls">
                    <div class='btn-group' data-target='repeat_byday' data-toggle-name='repeat_byday'
                    data-toggle='buttons-checkbox'>
                        <button class='btn-cal' name='input_repeat_byday' type='button' value='SU'>
                            SU
                        </button>
                        <button class='btn-cal' name='input_repeat_byday' type='button' value='MO'>
                            MO
                        </button>
                        <button class='btn-cal' name='input_repeat_byday' type='button' value='TU'>
                            TU
                        </button>
                        <button class='btn-cal' name='input_repeat_byday' type='button' value='WE'>
                            WE
                        </button>
                        <button class='btn-cal' name='input_repeat_byday' type='button' value='TH'>
                            TH
                        </button>
                        <button class='btn-cal' name='input_repeat_byday' type='button' value='FR'>
                            FR
                        </button>
                        <button class='btn-cal' name='input_repeat_byday' type='button' value='SA'>
                            SA
                        </button>
                    </div>
                    <div style='margin-top: 6px'>
                        <label class='checkbox'>
                            <input id="event_every_day" name="event_every_day" type="checkbox" value="1"
                            />
                            Every Day
                        </label>
                    </div>
                    <input id='event_repeat_byday' name='repeat_byday' type='hidden'>
                </div>
            </div>
            <div class=" control-group">
                <label class="control-label">
                    Repeat Until
                </label>
                <div class="controls">
                    <label class='radio inline'>
                        <input checked="checked" id="repeat_until_never" name="repeat_until" type="radio"
                        value="never" />
                        Never &nbsp; &nbsp;
                    </label>
                    <label class='radio inline'>
                        <input checked="checked" id="repeat_until_date" name="repeat_until" type="radio"
                        value="date" />
                        <input class="date input-small" id="event_repeat_until" name="repeat_until_date"
                        type="text" value="12/29/2013" />
                    </label>
                </div>
            </div>
        </div>
        <div class='alert alert-error alert-block text-center' id='event-error'
        style='display:none'>
            &nbsp;
        </div>
    </div>
    <div class='modal-footer'>
        <a aria-hidden='true' class='btn' data-dismiss='modal' href='#'>
            Close
        </a>
        <input class="btn btn-primary" data-loading-text="Saving..." id="event-submit"
        name="commit" type="submit" value="Add" />
    </div>
</div>
</form>
